{# set pageRoute var. at php file use: \Slim::get('config')->pageRoute = '/home'; #}

{% set _pageRoute = attrs.route %}
{% set _pageTitle = attrs.pageTitle %}
{% set _container = _container is defined ? _container : 'container' %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% block metadata %}
        <meta name="description" content="{{ attrs.description }}">
        <meta name="keywords" content="{{ attrs.keywords }}">
    {% endblock %}
    <title> {% block title %} {{ _pageTitle }} {% endblock %} </title>
    <link rel="icon" href="/assets/images/favicon_16.ico">
    <link href="/assets/libs/bootswatch/{{ _globals.params.cssStyle }}/bootstrap.min.css" rel="stylesheet">
    <link href="/assets/src/app.css" rel="stylesheet">
    {% block style %} {% endblock %}
    {% block styleCode %} {% endblock %}
    <script type="text/javascript">
        var GVar = {};
        {% block pageScript %} {% endblock %}
    </script>
    {% block topScript %} {% endblock %}
</head>
{% set _leftWidth = _leftWidth is defined ? _leftWidth : 'col-md-3' %}
{% set _rightWidth = _rightWidth is defined ? _rightWidth : 'col-md-9' %}
<body>
    <div class="wrapper">
        {% block header %}
            {% include '_includes/navbar.twig' %}
        {% endblock %}

        <div class="body-header">
             {% block bodyHeader %} {% endblock %}
        </div>

        <div class="{{ _container|default('container') }}" id="page-container">
            <ol class="breadcrumb">
              <li><a href="/">Home</a></li>
              <li><a href="#">Library</a></li>
              <li class="active">Data</li>
            </ol>

            {% include '_includes/alert.msg.twig' %}
            <div class="row">
                {% if _leftWidth %}
                <div class="{{ _leftWidth }} page-left">
                    {% block sidebar %} page sidebar!{% endblock %}
                </div>
                {% endif %}

                {% if _rightWidth %}
                <div class="{{ _rightWidth }} page-right">
                    {% block body %} <h1>This is page Body.</h1> {% endblock %}
                </div>
                {% endif %}
            </div>
        </div>
    </div>
    {% block footer %}
        {% include '_includes/footer.twig' %}
    {% endblock %}
    <script src="/assets/libs/jquery.min.js"></script>
    <script src="/assets/libs/bootstrap.min.js"></script>
    <script src="/assets/src/app.js"></script>
    {% block bottomScript %}
    {% endblock %}
</body>
</html>
